#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2015-2019, Intel Corporation

#
# src/test/blk_pool/TEST22 -- unit test for pmemblk_open
#

. ../unittest/unittest.sh

require_test_type medium

setup
umask 0

#
# TEST22 existing file, file size < min required size, bsize == 0
#        (valid pool header)
#
expect_normal_exit ./blk_pool$EXESUFFIX c $DIR/testfile 512 20 0640
truncate -s 1M $DIR/testfile

expect_normal_exit ./blk_pool$EXESUFFIX o $DIR/testfile 0

check

pass
